Assessment of episodes of drug use and psychosocial stress is complicated by the fact that each is often transient and difficult to recall accurately. Assessment of their causal connections with one another, and of their genetic and environmental determinants, is complicated by the complexity of the causal connections and by the elusive nature of what constitutes the environment. In this project, we are assessing drug use and psychosocial stress in near-real time through ecological momentary assessment (EMA), in which participants use handheld electronic diaries to record events as they occur and to report recent or ongoing events in response to randomly timed prompts throughout the day. We are also maintaining real-time records of where the reported events occur by having participants carry GPS loggers to track their whereabouts with a spatial resolution of several meters. We use these data collectively in a method we are calling geographical momentary assessment (GMA). Our goal with GMA has little to do with knowing the specific Baltimore locations where drug-related behaviors occur, and everything to do with gaining generalizable knowledge about how activity spaces (the spaces in which daily activities occur) are associated with such behaviors and their precipitants. We are currently analyzing GMA data from 190 opioid/cocaine users in opioid-agonist maintenance. This sample, much larger than our initial pilot sample, will enable us to investigate the relationships among individual characteristics and environmental influences on drug use. We are also developing more sophisticated methods for interpolating observer ratings between specific rated locations, better approaches to the generation of scores and maps from raw observer rating scores, and more sensitive approaches to modeling associations between momentary surroundings and mood, craving, and stress. In the first 97 participants, we examined the relationship between stressful events and drug use. We demonstrated that, in a subset of patients, the severity of stressful events increases in the days leading up to cocaine use, though stressful events are neither necessary nor sufficient to account for many drug-use eventsa finding that underscores the importance of assessing base rates of events in order to avoid inflated estimates of association. We have recently begun to collect these types of data in non-drug users living in Baltimore to determine whether they experience similar responses to environmental variables. One of our other mHealth activities is evaluation of the effects of drug use on circadian rhythm and sleep. We are currently analyzing data from a mobile device that monitors light exposure and activity to assess circadian disruption and its relation to treatment outcome. We are also conducting a study of sleep in opioid-maintained outpatients with and without chronic pain.